package com.qq.weixin.mp.api.pay.model;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.hxexp.weixin.common.jaxb.CDATAAdapter;

/**
 * 微信支付API返回结果基类
 * @author li.jiang
 *
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
// @XmlSeeAlso({ UnifiedOrderJaxb.class })
public class PayCommonJaxb implements Serializable {

    private static final long serialVersionUID = -2405780486129233581L;
    /**
     * 返回状态码 (SUCCESS/FAIL 此字段是通信标识，非交易标识，交易是否成功需要查看result_code来判断 )
     */
    @XmlElement(name = "return_code")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String returnCode;
    /**
     * 返回信息 (如非空，为错误原因 )
     */
    @XmlElement(name = "return_msg")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String returnMsg;
    /**
     * 公众账号ID
     */
    @XmlElement(name = "appid")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String appId;
    /**
     * 商户号
     */
    @XmlElement(name = "mch_id")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String mchId;
    /**
     * 随机字符串，不长于32位
     */
    @XmlElement(name = "nonce_str")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String nonceStr;
    /**
     * 签名
     */
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String sign;
    /**
     * 业务结果 (SUCCESS/FAIL)
     */
    @XmlElement(name = "result_code")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String resultCode;
    /**
     * 错误代码
     */
    @XmlElement(name = "err_code")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String errCode;
    /**
     * 错误代码描述
     */
    @XmlElement(name = "err_code_des")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String errCodeDes;
    /**
     * @return the returnCode
     */
    public String getReturnCode() {
        return returnCode;
    }
    /**
     * @param returnCode the returnCode to set
     */
    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }
    /**
     * @return the returnMsg
     */
    public String getReturnMsg() {
        return returnMsg;
    }
    /**
     * @param returnMsg the returnMsg to set
     */
    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }
    /**
     * @return the appId
     */
    public String getAppId() {
        return appId;
    }
    /**
     * @param appId the appId to set
     */
    public void setAppId(String appId) {
        this.appId = appId;
    }
    /**
     * @return the mchId
     */
    public String getMchId() {
        return mchId;
    }
    /**
     * @param mchId the mchId to set
     */
    public void setMchId(String mchId) {
        this.mchId = mchId;
    }
    /**
     * @return the nonceStr
     */
    public String getNonceStr() {
        return nonceStr;
    }
    /**
     * @param nonceStr the nonceStr to set
     */
    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }
    /**
     * @return the sign
     */
    public String getSign() {
        return sign;
    }
    /**
     * @param sign the sign to set
     */
    public void setSign(String sign) {
        this.sign = sign;
    }
    /**
     * @return the resultCode
     */
    public String getResultCode() {
        return resultCode;
    }
    /**
     * @param resultCode the resultCode to set
     */
    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }
    /**
     * @return the errCode
     */
    public String getErrCode() {
        return errCode;
    }
    /**
     * @param errCode the errCode to set
     */
    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }
    /**
     * @return the errCodeDes
     */
    public String getErrCodeDes() {
        return errCodeDes;
    }
    /**
     * @param errCodeDes the errCodeDes to set
     */
    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }
}
